package chen.web.user.event;

import chen.web.event.Event;
import chen.web.user.Account;

public class OnlineEvent implements Event {

	private Account acc;
	private boolean autoOnline;
	
	public OnlineEvent(Account acc, boolean autoOnline){
		this.acc = acc;
		this.autoOnline = autoOnline;
	}
	
	
	/**
	 * 获取上线用户的帐号
	 * @return
	 */
	public Account getOnlineAccount(){
		return acc;
	}
	
	/**
	 * 是否为自动上线. 
	 * 当用户使用了持久会话功能(remember me), 会记住用户. 下次访问时会自动上线.
	 * @return
	 */
	public boolean isAutoOnline(){
		return autoOnline;
	}
}
